﻿using Volo.Abp.Authorization.Permissions;

namespace AbpVnext_Module.Permission
{
    
    public class CustomPermissionDefinitionProvider : PermissionDefinitionProvider
    {
        /// <summary>
        /// 定义权限
        /// </summary>
        /// <param name="context"></param>
        /// <exception cref="NotImplementedException"></exception>
        public override void Define(IPermissionDefinitionContext context)
        {
            //定义业务模块 ， 定义权限组
            PermissionGroupDefinition permissionGroupDefinition = context.AddGroup("Products");
            //定义具体权限(商品查询权限)
            permissionGroupDefinition.AddPermission("Product_Select");
            permissionGroupDefinition.AddPermission("Product_Delete");
            permissionGroupDefinition.AddPermission("Product_Update");
            permissionGroupDefinition.AddPermission("Product_Insert");
            permissionGroupDefinition.AddPermission("Product_Select_Page");
        }
    }
}
